home *** CD-ROM | disk | FTP | other *** search
- Path: morris.vip.best.com!user
- From: morris@best.com (Paul Morris)
- Newsgroups: comp.dcom.modems
- Subject: Re: Arrow keys
- Date: Sat, 13 Apr 1996 22:52:59 -0700
- Organization: Best Internet Communications
- Message-ID: <morris-1304962252590001@morris.vip.best.com>
- References: <4kp32v$jom@monet.ICSI.Net>
- NNTP-Posting-Host: morris.vip.best.com
-
- In article <4kp32v$jom@monet.ICSI.Net>, cdbiem@roo.netrax.net (Charles
- Biemiller X0024) wrote:
-
- > What is the proper byte to send when the arrow keys are pressed? I am
- > assembling a communications program and I set the arrow keys to send the
- > following to the COM port:
- >
- > KEY BYTE
- >
- > DOWN = 0EH (CTRL+N)
- > UP = 10H (CTRL+P)
- > LEFT = 02H (CTRL+B)
- > RIGHT = 06H (CTRL+F)
- >
- > While this works fine with most programs I am connected to, some do not
- > move the cursor at all. Please let me know what are the proper bytes to
- > send to the COM port for the arrow keys.
- >
- > Thanks,
- > Charlie Biemiller
-
-
- I think the correct assignment is as follows:
-
- UP = <ESC>OA
- DOWN = <ESC>OB
- RIGHT = <ESC>OC
- LEFT = <ESC>OD
-
- Note that each key send 3 bytes. The first is <ESCAPE>, that is,
- Control-[ (ascii 27). The second byte is the letter "O" (ascii 79).
- The third byte is one of the letters "A", "B", "C" or "D" (ascii 65-68)
- depending on the direction.
-
- The ascii codes given here, 27, 79, 65, 66, 67, 68, are in decimal.
- The hex equivalents would be 1B, 4F, 41, 42, 43, 44.
-
- Paul
-